//
//  ViewController.m
//  ABCRepeateClick
//
//  Created by luoshizhen on 07/26/2024.
//  Copyright (c) 2024 luoshizhen. All rights reserved.
//

#import "ViewController.h"
#import <ABCRepeateClick/ABCRepeateClick.h>
#import "ABCRepeateClick_Example-Swift.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
  
    [ABCRepeatClickManager shareInstance].openUIControlPreventRepeatClick;
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
    btn.repeateTime= 10;
    btn.backgroundColor = [UIColor redColor];
    [btn addTarget:self  action:@selector(btnPressed) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(0, 300, 100, 100)];
    btn2.backgroundColor = [UIColor redColor];
    [btn2 addTarget:self  action:@selector(btnPressed2) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn2];
   
    
	// Do any additional setup after loading the view, typically from a nib.
}
- (void)btnPressed2{
   
    NSLog(@"eee");
}

- (void)btnPressed{
//    if ([self.view abcPreventRepeateClickAction:5.0] == NO) {
//        return;
//    }
   // ShareInstance_Interface(10.0);
    NSLog(@"ddd");

//    TestViewController *ViewController = [[TestViewController alloc] init];
//    [self presentModalViewController:ViewController animated:YES];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
